package FiveHomeworkDesign.Iterator;

/**
 * @author 北巷_东坡
 * @date 2022/11/21 21:52
 * @computer 10741
 */
public class Student206 extends Iterator206 implements Comparable<Student206>{
    private String name;
    private int age;
    public Student206(String name, int age) {
        super();
        this.name = name;
        this.age = age;
    }
    public int compareTo(Student206 stu){
        if(this.age > stu.age){
            return -1;
        }else if(this.age < stu.age){
            return 1;
        }
        return 0;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}
